home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.cs.arizona.edu
/
ftp.cs.arizona.edu.tar
/
ftp.cs.arizona.edu
/
icon
/
newsgrp
/
group97b.txt
/
000074_icon-group-sender _Mon Sep 22 12:50:06 1997.msg
< prev
next >
Wrap
Internet Message Format
|
2000-09-20
|
2KB
Return-Path: <icon-group-sender>
Received: from kingfisher.CS.Arizona.EDU (kingfisher.CS.Arizona.EDU [192.12.69.239])
by cheltenham.cs.arizona.edu (8.8.7/8.8.7) with SMTP id MAA21908
for <icon-group-addresses@cheltenham.CS.Arizona.EDU>; Mon, 22 Sep 1997 12:50:06 -0700 (MST)
Received: by kingfisher.CS.Arizona.EDU (5.65v4.0/1.1.8.2/08Nov94-0446PM)
id AA07364; Mon, 22 Sep 1997 12:50:05 -0700
From: gep2@computek.net
Date: Mon, 22 Sep 1997 11:44:25 -0500
Message-Id: <199709221644.LAA08065@axp.cmpu.net>
Mime-Version: 1.0
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Subject: if not find a and/or b, do x
To: icon-group@cs.arizona.edu
X-Mailer: SPRY Mail Version: 04.00.06.17
Errors-To: icon-group-errors@cs.arizona.edu
Status: RO
>I want to write up a little program that does, among other things, some
error checking for me. Basically, if the program finds a certain element
in a line, I want it to look for two other elements and to write the line
if one or both of those two other elements are missing.
>Ex.
if find( "{T" )
then if not find( "{A" | "{O" )
then write( line )
should write (1), (2), and (3), but not (4)
1. {T
2. {T {A
3. {T {O
4. {T {O {A
Here is a SNOBOL4+/SPITBOL version:
&fullscan = 1
next line = input ?(atag = otag = ttag = ) :f(end)
line fence breakx("{") len(1) ("T" $ ttag | "O" $ otag | "A" $ atag)
+ *differ(atag) *differ(otag) *differ(ttag)
output = differ(ttag) ~(differ(otag) differ(atag)) line :(next)
end
Gordon Peterson
http://www.computek.net/public/gep2/
Support the Anti-SPAM Amendment! Join at http://www.cauce.org/